<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>Electron Desktop</title>
  <script>
    const { ipcRenderer } = require('electron')
    function invoke(type) {
      ipcRenderer.send('command', type)
    }
  </script>
</head>

<body>
  <p>
    <button onclick="invoke('open')">选择文件</button>
    <button onclick="invoke('save')">保存文件</button>
    <button onclick="invoke('message')">弹窗提示</button>
  </p>
</body>

</html>